/* Copied from static/css/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    color: #333;
    font-size: 2rem;
    font-weight: bold;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
    text-align: center;
}

.logo-placeholder {
    background: #f0f0f0;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    color: #666;
    border: 2px dashed #ccc;
}

.main-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: bold; color: #555; }
.form-group input, .form-group select {
  width: 100%; padding: 12px; border: 2px solid #ddd; border-radius: 5px; font-size: 16px; transition: border-color 0.3s;
}
.form-group input:focus, .form-group select:focus { outline: none; border-color: #667eea; }

.btn { padding: 12px 24px; border: none; border-radius: 5px; font-size: 16px; font-weight: bold; cursor: pointer; transition: all 0.3s; text-decoration: none; display: inline-block; }
.btn-primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); }
.btn-primary:disabled { background: #ccc; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-secondary { background: #6c757d; color: white; }
.btn-secondary:hover { background: #5a6268; }
.btn-danger { background: #dc3545; color: white; }
.btn-danger:hover { background: #c82333; }

/* 新增：导航按钮样式 */
.nav {
    display: flex;
    gap: 10px;
}

.nav-btn {
    padding: 10px 20px;
    border: 2px solid #667eea;
    background: transparent;
    color: #667eea;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.nav-btn:hover {
    background: #667eea;
    color: white;
}

.nav-btn.active {
    background: #667eea;
    color: white;
}

/* 新增：标签页内容 */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 确保所有标签页内容都能正确显示 */
#contestants.tab-content,
#judges.tab-content,
#scores.tab-content {
    display: none;
}

#contestants.tab-content.active,
#judges.tab-content.active,
#scores.tab-content.active {
    display: block;
}

/* 新增：控制按钮组 */
.contestant-controls,
.judge-controls,
.score-controls {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 新增：状态指示器 */
.status {
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 0.9em;
    font-weight: bold;
}

.status.active {
    background: #d4edda;
    color: #155724;
}

.status.inactive {
    background: #f8d9da;
    color: #721c24;
}

/* 新增：选中状态 */
.list-item.selected {
    background: #e3f2fd;
    border-left-color: #2196f3;
}

/* 新增：表格样式 */
.scores-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.scores-table th,
.scores-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.scores-table th {
    background: #f8f9fa;
    font-weight: bold;
    color: #333;
}

.scores-table tr:hover {
    background: #f5f5f5;
}

.judge-name {
    font-weight: bold;
    color: #333;
}

.score-value {
    font-weight: bold;
    color: #667eea;
}

/* 新增：统计摘要 */
.scores-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
}

.summary-item {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.summary-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.summary-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
}

/* 新增：小按钮 */
.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
}

/* 新增：评分管理区域 */
.scores-management {
    margin-top: 20px;
}

.no-scores {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px;
}

/* 新增：项目元信息 */
.item-meta {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.message { padding: 15px; border-radius: 5px; margin-top: 20px; font-weight: bold; }
.message.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.message.error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.message.info { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

.loading { text-align: center; padding: 40px; color: #666; font-style: italic; }

.list-container { margin-top: 20px; }
.list-item { background: #f8f9fa; padding: 15px; margin-bottom: 10px; border-radius: 5px; border-left: 4px solid #667eea; display: flex; justify-content: space-between; align-items: center; }
.list-item:hover { background: #e9ecef; }
.list-item.active { border-left-color: #28a745; background: #d4edda; }
.list-item-info { flex: 1; }
.list-item-actions { display: flex; gap: 10px; }

.section { margin-bottom: 40px; }
.section h2 { color: #333; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid #667eea; }
.form { background: #f8f9fa; padding: 20px; border-radius: 5px; margin-bottom: 20px; }

@media (max-width: 768px) {
  .container { padding: 10px; }
  .header { flex-direction: column; gap: 15px; }
  .logo-text { font-size: 1.4rem; }
  .main-content { padding: 20px; }
  .list-item { flex-direction: column; gap: 10px; }
  .list-item-actions { width: 100%; justify-content: center; }
  .nav { flex-direction: column; }
  .contestant-controls,
  .judge-controls,
  .score-controls { flex-direction: column; }
  .scores-summary { grid-template-columns: 1fr; }
}
